 
#include "Pch.h"
#include "ScriptBind_Mini.h"
#include "Client/CoreApp.h"
#include "Client/IMcManager.h"
//------------------------------------------------------------------------
CScriptBind_Mini::CScriptBind_Mini( Ci::IScriptSystem * pScriptSystem, Ci::CCoreApp * pSystem )
{
	CScriptableBase::Init(pScriptSystem,pSystem);
	SetGlobalName("Mini");
 
#undef SCRIPT_REG_CLASSNAME 
#define SCRIPT_REG_CLASSNAME &CScriptBind_Mini::

	 SCRIPT_REG_FUNC(addToScene);
	//SCRIPT_REG_FUNC(Detach);
}
//-----------------------------------------------------------------------------
CScriptBind_Mini::~CScriptBind_Mini()
{
}
 //-----------------------------------------------------------------------------

 
//-----------------------------------------------------------------------------
int CScriptBind_Mini::addToScene(IFunctionHandler *pH)
{
	const char* path;
	const char* scenename;
	const char* filetype;
	const char* findchildDir;
	if(!pH->GetParam(1,path))
		m_pSS->RaiseError( "<CScriptBind_Mini::addToScene> parameter 1 not specified or nil (entity id to attach to)" );

	if(!pH->GetParam(2,scenename))
		m_pSS->RaiseError( "<CScriptBind_Mini::addToScene> parameter 2 not specified or nil (entity id to attach to)" );

	if(!pH->GetParam(3,filetype))
		m_pSS->RaiseError( "<CScriptBind_Mini::addToScene> parameter 3 not specified or nil (entity id to attach to)" );

	if(!pH->GetParam(4,findchildDir))
		m_pSS->RaiseError( "<CScriptBind_Mini::addToScene> parameter 4 not specified or nil (entity id to attach to)" );


	Ci::CCoreApp::getSingleton().getMcMgr()->addResoucetoScene(path,scenename,filetype,findchildDir);
	return pH->EndFunction();
}
//-----------------------------------------------------------------------------